﻿@model dynamic

@if (Html.ValidationSummary() != null) {
    <div class="alert alert-dismissable alert-danger">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <strong>@T("Password change was unsuccessful. Please correct the errors and try again.")</strong>
        <p>@Html.ValidationSummary()</p>
    </div>
}

<h1>@Html.TitleForPage(T("Change Password").ToString()) </h1>
<p>@T("Use the form below to change your password.")</p>
<p>@T("New passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"]) </p>
@using (Html.BeginFormAntiForgeryPost()) { 
    <fieldset>
        <legend>@T("Account Information")</legend>
        <div>
            <label for="currentPassword">@T("Current password:")</label>
            @Html.Password("currentPassword", null, new { @class = "validate[required]" })
            @Html.ValidationMessage("currentPassword")
        </div>
        <div>
            <label for="newPassword">@T("New password:")</label>
            @Html.Password("newPassword", null, new { @class = "validate[required,minSize[" + ViewData["PasswordLength"] + "]]" })
            @Html.ValidationMessage("newPassword")
        </div>
        <div>
            <label for="confirmPassword">@T("Confirm new password:")</label>
            @Html.Password("confirmPassword", null, new { @class = "validate[required,minSize[" + ViewData["PasswordLength"] + "],equals[newPassword]]" })
            @Html.ValidationMessage("confirmPassword")
        </div>
        <div>
            <button class="primaryAction" type="submit">@T("Change Password")</button>
        </div>
    </fieldset>
} 